package com.sky.wsp.warning.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wangshaopeng@talkweb.com.cn
 * @desccription 在此输入描述
 * @date 2023/7/3
 */
@RestController
@RequestMapping("/log")
public class LogController {
    private static final Logger logger = LoggerFactory.getLogger(LogController.class);

    @GetMapping("/info")
    public String infoLog(String log) {
        logger.info(log);
        return "ok";
    }

    @GetMapping("/warn")
    public String warnLog(String log) {
        logger.warn(log);
        return "ok";
    }

    @GetMapping("/error")
    public String errorLog(String log) {
        logger.error(log);
        return "ok";
    }
}
